<?php 

// phpinfo();

$mysqli = @new mysqli("localhost", "root", "", "school1"); 

if ($mysqli->connect_errno) {
	echo "数据链接错误，错误代码".$mysqli->connect_errno."错误信息".$mysqli->connect_error;
}

$mysqli->query ('set names utf8');

$sql = 'select * from stu';

$res = $mysqli->query ($sql);

var_dump($res->fetch_assoc());
var_dump($res->fetch_assoc());
var_dump($res->fetch_assoc());
var_dump($res->fetch_assoc());
var_dump($res->fetch_assoc());
var_dump($res->fetch_assoc());
var_dump($res->fetch_assoc());
var_dump($res->fetch_assoc());
var_dump($res->fetch_assoc());







 ?>